<?php
/**
 * Class model that provides the base functionality to manage pw_rules data
 *
 * This class was defined following the indications of
 * {@link http://www.overzealous.com/dmz/index.html DMZ ORM}. So,
 * this manage inserts, updates and deletes sql operations, as well as fully
 * set of instructions that can be used to make queries. And much more
 *
 * @author Gonzalez Federico, Viera Leonel
 * @package Protoweb
 * @subpackage model
 */
class Rule extends PwModel
{
    public $table      = "rules";
    public $model      = "rule";
    public $has_many   = array();
    public $has_one    = array();
    public $validation = array(
        'name' => array(
          'label' => 'Name',
          'rules' => array('trim', 'required','strtolower', 'alpha_dash_dot')
        ),
        'has_param' => array(
          'label' => 'Has param?',
          'rules' => array('required')
        ),
        'description' => array(
          'label' => 'Description',
          'rules' => array('trim')
        )
    );

    public function __construct($id = NULL)
    {
        parent::__construct($id);
    }
} // class Rule

/* End of file rule.php */
/* Location: ./application/models/rule.php */
